package ipt.dao.f4;

import ipt.enumeracion.Rol;
import ipt.exp.AlumnoException;
import ipt.vo.Alumno;

import java.util.Iterator;
import java.util.List;

public class ProbarAlumnoDao {

	
	 
    public static void main(String[] args) {

   	AlumnoJDBCDAO dao = new AlumnoJDBCDAO();
   	
   	Alumno alu=new Alumno("JUAN","Garcia","Anton","71542852D","jessica1984_es@hotmail.com",28,Rol.JEFE);
   	try {

		dao.insertAlumno(alu);
	} catch (AlumnoException e) {

		e.printStackTrace();
	}
   	
   	List<Alumno> lista = dao.getAlumnos();
   	Iterator<Alumno> it = lista.iterator();
   	while ( it.hasNext() ){
   		Alumno a = it.next();
   		System.out.println(a);
   		a=null;
   	}
  
    }
	
}
